﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Page.Master" AutoEventWireup="true" CodeBehind="News.aspx.cs" Inherits="HealthInsuranceMgm.Admin.News" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
     <script src="../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.validate.min.js" type="text/javascript"></script>
    <link href="../Styles/styleJs.css" rel="stylesheet" type="text/css" />
   <script type="text/javascript">
       $(document).ready(function () {
           $("#frmListPolicy").validate({
               errorElement: "span"
           });

       });
    </script>
<form id="frmNews"  runat="server">

   
    <asp:Panel ID="PanelinsertNew" runat="server">
    <table>
    <tr>
        <td>Title:</td><td>
            <asp:TextBox ID="txttitle" runat="server"></asp:TextBox></td>
    </tr>
     <tr>
     <td>Contents
         </td>
    </tr>
     <tr>
     <td></td>
        <td style="width: 642px" id="btnNews">
           <FCKeditorV2:FCKeditor ID="FCKeditor1" 
             runat="server" BasePath="~/fckeditor/" Height="400px">
         </FCKeditorV2:FCKeditor>
            <br />
            <asp:Button ID="btnNew" runat="server" 
                Text="insert News" onclick="btnNew_Click" />
            <br />
         </td>
    </tr>
</table>
    </asp:Panel>
 <asp:Panel ID="PanelListNew" runat="server">
     <fieldset>
            <legend> <h3>List News</h3></legend>

       
&nbsp;<asp:GridView ID="grvNew" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="id"
        onselectedindexchanging="grvNew_SelectedIndexChanging"
        ClientIDMode="Static" Width="627px" onrowcommand="grvNew_RowCommand" 
        onsorting="grvNew_Sorting" AllowSorting="True" 
        onrowdatabound="grvNew_RowDataBound" 
        onrowdeleting="grvNew_RowDeleting" 
        
        AllowPaging="True" 
                onpageindexchanging="grvNew_PageIndexChanging" PageSize="15" 
                BorderColor="#CCCCCC" BorderStyle="Solid">
        <Columns>
            <asp:BoundField DataField="id" HeaderText="News Id" 
                SortExpression="id" />
           
            <asp:BoundField DataField="title" HeaderText="Title" />
          
            <asp:CommandField ShowSelectButton="True" ButtonType="Image" 
                SelectImageUrl="~/images/Edit.gif" SelectText=""/>
           
           <asp:TemplateField> 
                    <ItemTemplate>
                      
       <asp:LinkButton ID="LinkButton1" 
         CommandArgument='<%# Eval("id") %>' 
         CommandName="Delete" runat="server">
            <img src="../images/Delete.png" style="border:0px" />
         </asp:LinkButton>
                    </ItemTemplate>
                    </asp:TemplateField> 
        </Columns>
                <PagerSettings PageButtonCount="15" />

    </asp:GridView>
 
    <asp:HiddenField Visible ="true" ID="HiddenField1" runat="server" />
     </fieldset>
    </asp:Panel>

    <asp:Panel ID="PanelUpdatenews" runat="server">
  <fieldset>
    <legend><h3>Update News</h3></legend>
     <table>
            <tr>
                <td>News ID:</td>
                 <td style="width: 665px">
                     <asp:TextBox ID="txtid" CssClass="required" runat="server"></asp:TextBox></td>
            </tr>
             <tr>
                <td>Title:</td>
                 <td><asp:TextBox ID="txttle" CssClass="required" runat="server"></asp:TextBox></td>
            </tr>
             <tr>
                <td>Connent:</td>
                 
            </tr>
            <tr>
            <td style="height: 319px"></td>
            <td style="height: 319px"><FCKeditorV2:FCKeditor ID="FCKeditor2"  runat="server" 
                    Height="450px">
                     </FCKeditorV2:FCKeditor></tr>
             <tr>
                <td></td>
                 <td style="width: 665px">
                     <asp:Button ID="btnupdate" runat="server" Text="Update" onclick="btnupdate_Click" />
                     <asp:Button ID="btnReset" runat="server"  Text="Reset" />
                     
                 </td>
            </tr>
            </table>
  </fieldset>
    </asp:Panel>
   

</form>
</asp:Content>